#!/bin/bash

autoconf --version &> /dev/null || {
  echo
  echo "**Error**: You must have \`autoconf' installed to compile this package."
  exit 1
}

automake --version &> /dev/null || {
  echo
  echo "**Error**: You must have \`automake' installed to compile this package."
  exit 1
}

aclocal --version &> /dev/null || {
  echo
  echo "**Error**: You must have \`aclocal' installed to compile this package."
  exit 1
}

echo "aclocal..."
aclocal &> /dev/null || exit 1

echo "autoheader..."
autoheader &> /dev/null || exit 1

touch NEWS

echo "automake..."
automake --copy --gnu --add-missing &> /dev/null || exit 1

echo "autoconf..."
autoconf &> /dev/null || exit 1

rm -rf autom4te.cache

echo "Bye :)"
